<?php

class Core_Frontend_Component_Article_View_Category_List extends Core_Frontend_Share_View_List {

    public function __construct() {
        parent::__construct();
    }

    public function render(){
        $this->getNavigation()->addParameter('文章列表');
        Kd_Web::getPage()->setTitle('列表页')
                                    ->setKeyword('');
        $pageTemplate = App::getModel('design/page_template')->load('493eca751f6fceb07968771690e59698');
        $this->getVariables()->setData('page_template', $pageTemplate);
        $template = new Core_Template();
        $result = $template->render(DP_DESIGN.$pageTemplate->getVersion().DS.
            strtolower($pageTemplate->getArea()->getNamespace()).DS.$pageTemplate->getWebsiteTheme().DS.
            'template'.DS.$pageTemplate->getTemplateTheme().DS.str_replace('_', DS, $pageTemplate->getFileName()).'.phtml');
        return $this->contentResult($result);
    }

    protected function buildPagination($pagination) {
        parent::buildPagination($pagination);
        $url = $this->getPaginationUrl();
        $pagination->setUrlFormat($url)->setRecordCount($this->getRecords());
    }
}